Skip to content

Fix samples build on Apple Silicon; refresh Hugo modules; drop script headers - #85

Merged
alexander-yevsyukov merged 5 commits into
masterfrom
claude/relaxed-euclid-5d2a51
Oct 1, 2026
Merged

alexander-yevsyukov merged 5 commits into
masterfrom
claude/relaxed-euclid-5d2a51

Conversation

@alexander-yevsyukov

@alexander-yevsyukov alexander-yevsyukov commented Jul 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This branch began as a fix for the docs/_code/samples build on Apple Silicon
and now also carries two independent housekeeping changes, grouped in at the
maintainer's request: a refresh of the site's Go/Hugo modules and the removal of
copyright headers from the docs/_script/* helpers.

Net change vs master:

Area Files
Samples build fix docs/_code/samples/build.gradle
Go/Hugo module refresh docs/go.mod, docs/go.sum, docs/_preview/go.mod, docs/_preview/go.sum
Script header cleanup docs/_script/{check-samples,embed-code,hugo-build,hugo-serve,install-dependencies}

1. Fix docs/_code/samples build on Apple Silicon

spine.enableJava().server() (Spine Bootstrap 1.7.0, from 2020) drives the
samples build's repository and codegen-tool configuration, and two things it
sets are now broken:

  1. Dead repository. Bootstrap injects the shut-down JCenter as the source
    for third-party artifacts such as protoc. Nothing resolves from it.
  2. No Apple Silicon binaries. It pins protoc:3.13.0 and
    protoc-gen-grpc-java:1.28.1, which predate Apple Silicon — no osx-aarch_64
    build of either exists at any repository, so :generateProto fails on arm64 Macs.

Change — docs/_code/samples/build.gradle, after spine.enableJava().server():

  • Remove the dead BintrayJCenter repo and add mavenCentral(). Spine's own
    artifacts keep resolving from the spine.mycloudrepo.io repositories Bootstrap
    also injects — only the third-party source is repointed.
  • On arm64 macOS only, force the osx-x86_64 protoc and gRPC binaries. They
    run under Rosetta 2 and stay pinned at the exact Bootstrap-selected versions,
    so generated code is identical to every other platform. Other platforms keep
    the auto-detected native binary, so the Linux CI job is unaffected. The v1
    Bootstrap/protoc line is preserved.

Verified with ./gradlew -p docs/_code/samples clean buildAll (compileJava,
compileTestJava, and test all pass) on an arm64 Mac.

Reviewer notes

  • CI already exercises this via check-code-embedding.yml →
    build-embedded-code (./gradlew :buildAll on ubuntu-latest/JDK 8). It is
    Linux-x86_64 only, which is why this only ever broke local arm64 Mac builds;
    the change also moves samples off the sunset JCenter.
  • Sibling examples have the same arm64 gap (examples/hello, Bootstrap 1.9.0;
    examples/airport, Bootstrap 1.8.0) — both fail on protoc-3.13.0-osx-aarch_64.
    Those are pinned spine-examples/* submodules, so the equivalent fix belongs
    upstream and is not included here.

2. Refresh Go/Hugo modules

Bump the Hugo modules the site pulls in:

  • docs/ — validation/docs → …20260902132507-6465029c83b9
  • docs/_preview/ — site-commons → …20260722151517-5ab10187ff58,
    validation/docs → …6465029c83b9,
    hugo-mod-bootstrap-scss/v5 v5.20300.20400 → v5.20300.20800

Verified by rebuilding the preview site — npm ci + hugo --gc in
docs/_preview (i.e. ./gradlew installDependencies buildSite): 95 pages, no
warnings or errors
, and hugo mod graph confirms the new versions are the ones
actually resolved.

3. Remove copyright headers from docs/_script/*

Strip the boilerplate license/copyright comment blocks from the five helper
scripts. Shebang lines and executable bits are retained, so Gradle's Exec
tasks (runSite, buildSite, embedCode, checkSamples,
installDependencies) are unaffected.

Note on the base merge

master was merged into this branch to clear GitHub's merge-conflict state. The
only content conflict was the build.gradle copyright header, resolved in
master's favour (the CodeMatters header); gradlew.bat was aligned with
master's line-ending normalization and carries no net change.

🤖 Generated with Claude Code

Spine Bootstrap 1.7.0 configures the samples build to resolve third-party
artifacts (protoc, the gRPC codegen plugin) from JCenter, which is shut
down, and pins protoc 3.13.0 / protoc-gen-grpc-java 1.28.1 — versions
that predate Apple Silicon and have no `osx-aarch_64` build at any
repository. As a result `:generateProto` fails on arm64 Macs, and the
JCenter reference is dead weight everywhere else.

Repoint third-party resolution to Maven Central (Spine's own artifacts
keep resolving from the `spine.mycloudrepo.io` repositories Bootstrap
also injects), and, on arm64 macOS only, force the `osx-x86_64` protoc
and gRPC binaries so they run under Rosetta 2 while staying pinned at the
exact Bootstrap-selected versions — generated code is byte-for-byte
identical to every other platform. Non-mac platforms keep Bootstrap's
auto-detected native binary, so the Linux CI job is unaffected.

Verified with `./gradlew -p docs/_code/samples clean buildAll`
(compileJava, compileTestJava, and test all pass) on an arm64 Mac.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@alexander-yevsyukov alexander-yevsyukov moved this to 🏗 In progress in v2.0 Jul 24, 2026
@alexander-yevsyukov alexander-yevsyukov self-assigned this Jul 24, 2026
@alexander-yevsyukov alexander-yevsyukov moved this from 🏗 In progress to 📋 Backlog in v2.0 Aug 6, 2026
alexander-yevsyukov and others added 2 commits October 1, 2026 16:08
master renormalized gradlew.bat to CRLF via an updated `.gitattributes`
(`text`, `eol=crlf`). Recording the identical content on this branch
lets the master merge proceed; the blob is byte-for-byte identical to
master's gradlew.bat, so it contributes no net change to the PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Resolve the sole conflict in docs/_code/samples/build.gradle: keep
master's current copyright header (CodeMatters) and retain this
branch's samples build fix (Maven Central repoint + arm64
osx-x86_64 protoc/grpc override). The build logic is byte-for-byte
identical to the already-verified fix commit; only the comment header
changed. gradlew.bat matches master's line-ending normalization.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@alexander-yevsyukov alexander-yevsyukov changed the title Fix docs/_code/samples build on Apple Silicon Fix docs/_code/samples build on Apple Silicon Oct 1, 2026
... to be in-line with scripts in `config` and other repos.
@alexander-yevsyukov alexander-yevsyukov changed the title Fix docs/_code/samples build on Apple Silicon Fix samples build on Apple Silicon; refresh Hugo modules; drop script headers Oct 1, 2026
@alexander-yevsyukov
alexander-yevsyukov merged commit 0f296b0 into master Oct 1, 2026
4 checks passed
@alexander-yevsyukov
alexander-yevsyukov deleted the claude/relaxed-euclid-5d2a51 branch October 1, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants